/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package homework.demo3;

import java.util.Hashtable;

/**
 *
 * @author Administrator
 */
public class BookDemo {
    public static void main(String[] args) {
        
        Hashtable s = new Hashtable();
        BookBean tmp = null;
        s.put("isbn001", new BookBean("isbn001","11111","22222","33333",100));
        s.put("isbn002", new BookBean("isbn002","11112","22223","33334",100));
        s.put("isbn003", new BookBean("isbn003","11113","22224","33335",100));
        s.put("isbn004", new BookBean("isbn004","11114","22225","33336",100));
        s.put("isbn005", new BookBean("isbn005","11115","22226","33337",100));
        
        
        String key="isbn002";
        if(s.containsKey(key)){
            tmp=(BookBean)(s.get(key));
            System.out.println("书名："+tmp.getName());
            System.out.println("作者："+tmp.getAuthor());
            System.out.println("出版社："+tmp.getPublisher());
            System.out.println("价格："+tmp.getPrice());
            System.out.println("**："+tmp.getIsbn());
            
        }
        else{
            System.out.println("没这书呀，笨！");
        }
        
    
    }

}
